home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Applications / Telnet 2.7b5 / source / parse / parse.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-18  |  3.7 KB  |  119 lines  |  [TEXT/CWIE]

  1.  
  2. /* These are the different Telnet option negotiation tags */
  3. #define TEL_EOF            236            /* BYU LSC */
  4. #define TEL_SUSP        237
  5. #define TEL_ABORT         238            //CCP for linemode rfc
  6. #define    TEL_SE            240            /* end sub-negitiation */                // 360
  7. #define    TEL_NOP            241            /* No Operation */
  8. #define TEL_DM            242            /* data mark */
  9. #define TEL_BREAK        243            
  10. #define TEL_IP            244            /* the ole' Interrupt Process */
  11. #define TEL_AO            245            /* Abort Output */
  12. #define    TEL_AYT            246            /* Are You There???? */
  13. #define    TEL_EC            247            /* Erase Char */
  14. #define TEL_EL            248            /* Erase Line */
  15. #define TEL_GA            249            /* Telnet Go-Ahead */
  16. #define    TEL_SB            250            /* start a Subnegotion */                // 372
  17. #define TEL_WILLTEL     251            /* Negotiate:  Will do this option */    // 373
  18. #define TEL_WONTTEL     252            /* Negotiate:  Wont do this option */    // 374
  19. #define TEL_DOTEL        253            /* Negotiate:  Do this option */        // 375
  20. #define TEL_DONTTEL     254            /* Negotiate:  Dont do this option */    // 376
  21. #define    TEL_IAC            255
  22.  
  23. /* these are the rest of the defines needed for the option negitiations */
  24. #define TS_NORM        0            /* parsing data normal */
  25. #define    TS_SB        1            /* Subnegotiation data follows */
  26. #define    TS_SE        2
  27. #define    TS_WILL        3
  28. #define    TS_WONT        4
  29. #define    TS_DO        7
  30. #define    TS_DONT        8
  31. #define ESCFOUND             5            /* we have found an ESC sequence */
  32. #define IACFOUND             6            /* negotiation data follows */
  33. #define    SEXECUTE            200
  34. #define    IAC                    255            /* signals negotiation data is coming */
  35. #define GS                    29            /* we can drop into TEK from here */
  36.  
  37.  
  38. /* these are some of the various options that we can negotiate about */
  39. #define N_BINARY             0            /* binary data transfer */
  40. #define N_ECHO                1            /* for local echo stuff */
  41. #define N_SGA                3            /* Go ahead */
  42. #define N_STATUS            5        
  43. #define N_TIMING            6            /* timing mark */
  44. #define    N_TERMTYP            24            /* set the terminal type */
  45. #define N_NAWS                31            /* Negotiate About Window Size */
  46. #define    N_TERMSPEED            32            /* how fast can we go? */    
  47. #define N_REMOTEFLOW        33            /* do Remote Flow Control */
  48.  //flow control suboptions
  49.     #define        FLOW_OFF            0    // dont allow flow control  
  50.     #define        FLOW_ON             1    // allow flow control
  51.     #define        FLOW_RESTART_ANY    2    // restart flow on any character
  52.     #define        FLOW_RESTART_XON    3    // restart flow only on XON
  53.  
  54.  
  55. #define N_LINEMODE             34            /* Ah yes, the infamous Line Mode option */
  56.     #define L_MODE         1
  57.     #define L_FORWARDMASK 2
  58.     #define L_SLC         3
  59. #define    N_XDISPLOC            35
  60. #define N_AUTHENTICATION    37            /* Authentication */
  61. #define N_ENCRYPT            38            /* Encryption */
  62.  
  63.  
  64. /* Values for LINEMODE MODE */
  65. #define L_EDIT        1
  66. #define L_TRAPSIG      2
  67. #define L_MODE_ACK    4
  68. #define    L_SOFT_TAB    8
  69. #define    L_LIT_ECHO    16
  70. #define    L_MODE_MASK    31
  71.  
  72. /* these are the local keys, defined right before our very eyes!! */
  73. /* used for line-mode negotiations */
  74. #define SLC_NOSUPPORT    0
  75. #define SLC_CANTCHANGE    1
  76. #define SLC_VALUE        2
  77. #define SLC_DEFAULT        3
  78. #define SLC_LEVELBITS    3
  79. #define SLC_FLUSHOUT    32
  80. #define SLC_FLUSHIN        64
  81. #define SLC_AWK            128
  82.  
  83. #define    SLC_MAX            30
  84.  
  85. #define SLC_SYNCH        1
  86. #define SLC_BRK            2
  87. #define SLC_IP            3
  88. #define SLC_AO            4
  89. #define SLC_AYT            5
  90. #define SLC_EOR            6
  91. #define SLC_ABORT        7
  92. #define SLC_EOF            8
  93. #define SLC_SUSP        9
  94. #define SLC_EC            10
  95. #define SLC_EL           11
  96. #define SLC_EW           12
  97. #define SLC_RP            13
  98. #define SLC_LNEXT        14
  99. #define SLC_XON            15
  100. #define SLC_XOFF        16
  101. #define SLC_FORW1        17
  102. #define SLC_FORW2        18
  103.  
  104. #define DEFAULT_SLC_AO         21
  105. #define DEFAULT_SLC_IP         3
  106. #define DEFAULT_SLC_EC         127
  107. #define DEFAULT_SLC_EL         21
  108. #define DEFAULT_SLC_EOF     4
  109. #define DEFAULT_SLC_ABORT   3
  110. #define DEFAULT_SLC_SUSP     26
  111. #define DEFAULT_SLC_EW         23
  112. #define DEFAULT_SLC_RP         18
  113. #define DEFAULT_SLC_LNEXT     22
  114. #define DEFAULT_SLC_XON     17
  115. #define DEFAULT_SLC_XOFF     19
  116. #define DEFAULT_SLC_FORW1     22
  117. #define DEFAULT_SLC_FORW2     254
  118. #define    substate    tw->substat
  119.